<?php
namespace Api\Model;

use Think\Model\RelationModel;

class CapitalModel extends RelationModel
{

    protected $_link = array(
        'demands' => array(
            'class_name' => 'Demand',
            'mapping_type' => self::HAS_MANY,
            'foreign_key' => 'intention_capital',
            'mapping_fields' => 'demand_sn,demand_date,demand_type,custom_type,add_time,member_id,intention_capital'
        ),
        'attachs' => array(
            'class_name' => 'CapitalAttach',
            'mapping_type' => self::HAS_MANY,
            'foreign_key' => 'capital_id',
            'mapping_fields' => 'id,capital_id,full_path,add_time'
        )
    );
}

